home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Winter Shell 1.0d2 / Source / Libraries / OffscreenLib / OffscreenLib.h < prev   
Encoding:
C/C++ Source or Header  |  1994-01-04  |  1.7 KB  |  44 lines  |  [TEXT/KAHL]

  1. #pragma once
  2.  
  3. typedef struct OffscreenStruct OffscreenType, *OffscreenPtr, **OffscreenHandle;
  4. typedef void (*OffscreenDrawType)(OffscreenHandle offscreen, void *data);
  5.  
  6. struct OffscreenStruct {
  7.     GrafPtr        port;        /* port to draw into */
  8.     Rect        bounds;        /* portion of port to map */
  9.     BitMap        srcbits;    /* offscreen bitmap */
  10.     BitMap        dstbits;    /* on-screen bitmap */
  11.     Handle        base;        /* base address for offscreen bitmap */
  12.     Boolean        drawing;    /* true if drawing to offscreen bitmap */
  13.     Boolean        changed;    /* true if offscreen bitmap needs reimaging */
  14.     RgnHandle    mask;        /* mask for CopyBits */
  15.     RgnHandle    clip;        /* saved clip region */
  16.     RgnHandle    vis;        /* saved visible region */
  17.     void        *data;        /* data for draw procedure */
  18.     OffscreenDrawType draw;    /* application supplied draw procedure */
  19. };
  20.  
  21. /* validation */
  22. Boolean OffscreenValid(OffscreenHandle offscreen);
  23.  
  24. /* allocation */
  25. OffscreenHandle OffscreenBegin(GrafPtr port, OffscreenDrawType draw, void *data);
  26. void OffscreenEnd(OffscreenHandle offscreen);
  27.  
  28. /* attributes, properties */
  29. void OffscreenBounds(OffscreenHandle offscreen, Rect *bounds);
  30. void OffscreenBoundsSet(OffscreenHandle offscreen, const Rect *bounds);
  31. void OffscreenChange(OffscreenHandle offscreen);
  32. void OffscreenPurge(OffscreenHandle offscreen);
  33. Boolean OffscreenPurged(OffscreenHandle offscreen);
  34. Boolean OffscreenDrawing(OffscreenHandle offscreen);
  35. GrafPtr OffscreenPort(OffscreenHandle offscreen);
  36.  
  37. /* drawing */
  38. void OffscreenDrawProcedure(OffscreenHandle offscreen);
  39. void OffscreenDrawBitMap(OffscreenHandle offscreen);
  40. void OffscreenDraw(OffscreenHandle offscreen);
  41. void OffscreenBeginDrawing(OffscreenHandle offscreen);
  42. void OffscreenEndDrawing(OffscreenHandle offscreen);
  43.  
  44.